package com.crawler.jsoup.model;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.poi.ss.usermodel.HorizontalAlignment;

/**
 * 豆瓣数据模型
 * <p>
 * Created by devinlee in 2021.08.03
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@HeadRowHeight(20)
@HeadFontStyle(fontHeightInPoints = 11)
public class Douban {

    @ColumnWidth(40)
    @ExcelProperty("标题")
    private String title;

    @ColumnWidth(50)
    @ExcelProperty("链接")
    private String url;

    @ColumnWidth(50)
    @ExcelProperty("图片链接")
    private String imgUrl;

    @ColumnWidth(50)
    @ExcelProperty("摘要")
    private String desc;

    @ContentStyle(horizontalAlignment = HorizontalAlignment.CENTER)
    @ExcelProperty("点赞数")
    private Integer like;

    @ColumnWidth(20)
    @ExcelProperty("小组来源")
    private String source;
}
